#include<vector>
using namespace std;

class Solution {
private:
    vector<int> nums_org;
    vector<int> nums_cur;

public:
    Solution(vector<int>& nums):nums_org(nums),nums_cur(nums){

    }

    /** Resets the array to its original configuration and return it. */
    vector<int> reset() {
        nums_cur = nums_org;
        return nums_org;
    }

    /** Returns a random shuffling of the array. */
    vector<int> shuffle() {
        int size = nums_cur.size();
        for (int i = 0; i < size; ++i) 
            swap(nums_cur[i], nums_cur[i + rand() % (size - i)]);
            return nums_cur;
    }
};

/**
 * Your Solution object will be instantiated and called as such:
 * Solution* obj = new Solution(nums);
 * vector<int> param_1 = obj->reset();
 * vector<int> param_2 = obj->shuffle();
 */